package com.gaojiawei.multiThread10_BlockQueue;

import java.util.concurrent.PriorityBlockingQueue;

public class L03_PriorityBlockQueue {
    public static void main(String[] args) {
        PriorityBlockingQueue<Object> priorityBlockingQueue = new PriorityBlockingQueue<>();

        priorityBlockingQueue.add("126");
        priorityBlockingQueue.add("123");
        priorityBlockingQueue.add("121");
        priorityBlockingQueue.add("127");

        System.out.println(priorityBlockingQueue.remove());
        System.out.println(priorityBlockingQueue.remove());
        System.out.println(priorityBlockingQueue.remove());
        System.out.println(priorityBlockingQueue.remove());




    }
}
